import type { InjectionKey } from "vue";
import type { RadioGroupProps, RadioProps } from "../config";

export interface RadioGroupContext {
	props:Required<RadioGroupProps>,
	addField: (field: RadioContext) => void;
	removeField: (field: RadioContext) => void;
	unCheckedOther(field: RadioContext): void;
}

export interface RadioContext {
	props:Required<RadioProps>,
	isChecked: boolean;
	init(): void;
}

export const radioContextKey: InjectionKey<RadioContext> = Symbol(
	"ERadioContextKey"
);

export const radioGroupContextKey: InjectionKey<RadioGroupContext> =
	Symbol("ERadioGroupContextKey");
